import {
	defineConfig
} from 'vite'
import uni from '@dcloudio/vite-plugin-uni'

export default defineConfig(() => {

	return {
		base: './',
		build: {
			minify: true,
			outDir: 'dist',
		},
		server: {
			port: '3002'
		},
		plugins: [
			uni()
		],
		exclude: [
			/\/README\.md$/,
		],
		css: {
			preprocessorOptions: {
				// 如果'modern-compiler'不管用，可换成"modern"
				scss: {
					api: 'modern-compiler', // or "modern"
				}
			},
			postcss: {
				plugins: [
					require("tailwindcss"),
					require("autoprefixer"),
				]
			}
		}
	}
})
